garmin_fit: add handling of global UTC offset
authorMarco Leogrande <dark.knight.ita@gmail.com>
Thu, 22 Jun 2017 06:40:15 +0000 (23:40 -0700)
committerMarco Leogrande <dark.knight.ita@gmail.com>
Tue, 27 Jun 2017 04:07:41 +0000 (21:07 -0700)
commit8cfff2ef57c2886fbe630f21f9c060af08e2af58
tree7ecd95813fbdaf69a893216a5dc9abe3f139d47d
parentb0da6763634c0438508a2da325e8f5c3f49835ea
garmin_fit: add handling of global UTC offset

Some devices may record timestamps in system time (i.e. boot time),
rather than system time. As mentioned in Github issue #54 and in the
upstream documentation, we can recognize such a scenario when
timestamp is < 0x10000000.

Field 4 under the global ID for device settings records the difference
between system time and UTC time (this is called global UTC offset in
the upstream documentation).

Add code to store the global UTC offset in a new global variable, and
correctly handle all timestamps with the new information.
garmin_fit.cc